package com.ruoyi.system.order.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 商家信息表
 * @TableName merchant
 */
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@TableName(value ="merchant")
public class Merchant implements Serializable {
    /**
     * 商家ID
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 商家编号
     */
    private String merchantNo;

    /**
     * 店铺名称
     */
    private String name;

    /**
     * 负责人姓名
     */
    private String ownerName;

    /**
     * 联系电话
     */
    private String phone;

    /**
     * 邮箱
     */
    private String email;

    /**
     * 登录密码(BCrypt)
     */
    private String password;

    /**
     * 经营地址
     */
    private String address;

    /**
     * 经度
     */
    private BigDecimal lng;

    /**
     * 纬度
     */
    private BigDecimal lat;

    /**
     * 营业执照图片URL
     */
    private String businessLicenseUrl;

    /**
     * 综合评分
     */
    private BigDecimal rating;

    /**
     * 状态:PENDING待审核,ACTIVE正常,SUSPENDED停业,CLOSED关闭
     */
    private String status;

    /**
     * 账户余额
     */
    private BigDecimal balance;

    /**
     * 平台抽佣比例%
     */
    private BigDecimal commissionRate;

    /**
     * 每日开店时间
     */
    private Date openTime;

    /**
     * 每日关店时间
     */
    private Date closeTime;

    /**
     * 
     */
    private Date createTime;

    /**
     * 
     */
    private Date updateTime;

    /**
     * 软删除 0在用 1删除
     */
    private Integer deleted;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 商家ID
     */
    public Long getId() {
        return id;
    }

    /**
     * 商家ID
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 商家编号
     */
    public String getMerchantNo() {
        return merchantNo;
    }

    /**
     * 商家编号
     */
    public void setMerchantNo(String merchantNo) {
        this.merchantNo = merchantNo;
    }

    /**
     * 店铺名称
     */
    public String getName() {
        return name;
    }

    /**
     * 店铺名称
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 负责人姓名
     */
    public String getOwnerName() {
        return ownerName;
    }

    /**
     * 负责人姓名
     */
    public void setOwnerName(String ownerName) {
        this.ownerName = ownerName;
    }

    /**
     * 联系电话
     */
    public String getPhone() {
        return phone;
    }

    /**
     * 联系电话
     */
    public void setPhone(String phone) {
        this.phone = phone;
    }

    /**
     * 邮箱
     */
    public String getEmail() {
        return email;
    }

    /**
     * 邮箱
     */
    public void setEmail(String email) {
        this.email = email;
    }

    /**
     * 登录密码(BCrypt)
     */
    public String getPassword() {
        return password;
    }

    /**
     * 登录密码(BCrypt)
     */
    public void setPassword(String password) {
        this.password = password;
    }

    /**
     * 经营地址
     */
    public String getAddress() {
        return address;
    }

    /**
     * 经营地址
     */
    public void setAddress(String address) {
        this.address = address;
    }

    /**
     * 经度
     */
    public BigDecimal getLng() {
        return lng;
    }

    /**
     * 经度
     */
    public void setLng(BigDecimal lng) {
        this.lng = lng;
    }

    /**
     * 纬度
     */
    public BigDecimal getLat() {
        return lat;
    }

    /**
     * 纬度
     */
    public void setLat(BigDecimal lat) {
        this.lat = lat;
    }

    /**
     * 营业执照图片URL
     */
    public String getBusinessLicenseUrl() {
        return businessLicenseUrl;
    }

    /**
     * 营业执照图片URL
     */
    public void setBusinessLicenseUrl(String businessLicenseUrl) {
        this.businessLicenseUrl = businessLicenseUrl;
    }

    /**
     * 综合评分
     */
    public BigDecimal getRating() {
        return rating;
    }

    /**
     * 综合评分
     */
    public void setRating(BigDecimal rating) {
        this.rating = rating;
    }

    /**
     * 状态:PENDING待审核,ACTIVE正常,SUSPENDED停业,CLOSED关闭
     */
    public String getStatus() {
        return status;
    }

    /**
     * 状态:PENDING待审核,ACTIVE正常,SUSPENDED停业,CLOSED关闭
     */
    public void setStatus(String status) {
        this.status = status;
    }

    /**
     * 账户余额
     */
    public BigDecimal getBalance() {
        return balance;
    }

    /**
     * 账户余额
     */
    public void setBalance(BigDecimal balance) {
        this.balance = balance;
    }

    /**
     * 平台抽佣比例%
     */
    public BigDecimal getCommissionRate() {
        return commissionRate;
    }

    /**
     * 平台抽佣比例%
     */
    public void setCommissionRate(BigDecimal commissionRate) {
        this.commissionRate = commissionRate;
    }

    /**
     * 每日开店时间
     */
    public Date getOpenTime() {
        return openTime;
    }

    /**
     * 每日开店时间
     */
    public void setOpenTime(Date openTime) {
        this.openTime = openTime;
    }

    /**
     * 每日关店时间
     */
    public Date getCloseTime() {
        return closeTime;
    }

    /**
     * 每日关店时间
     */
    public void setCloseTime(Date closeTime) {
        this.closeTime = closeTime;
    }

    /**
     * 
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * 
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * 软删除 0在用 1删除
     */
    public Integer getDeleted() {
        return deleted;
    }

    /**
     * 软删除 0在用 1删除
     */
    public void setDeleted(Integer deleted) {
        this.deleted = deleted;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Merchant other = (Merchant) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getMerchantNo() == null ? other.getMerchantNo() == null : this.getMerchantNo().equals(other.getMerchantNo()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getOwnerName() == null ? other.getOwnerName() == null : this.getOwnerName().equals(other.getOwnerName()))
            && (this.getPhone() == null ? other.getPhone() == null : this.getPhone().equals(other.getPhone()))
            && (this.getEmail() == null ? other.getEmail() == null : this.getEmail().equals(other.getEmail()))
            && (this.getPassword() == null ? other.getPassword() == null : this.getPassword().equals(other.getPassword()))
            && (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()))
            && (this.getLng() == null ? other.getLng() == null : this.getLng().equals(other.getLng()))
            && (this.getLat() == null ? other.getLat() == null : this.getLat().equals(other.getLat()))
            && (this.getBusinessLicenseUrl() == null ? other.getBusinessLicenseUrl() == null : this.getBusinessLicenseUrl().equals(other.getBusinessLicenseUrl()))
            && (this.getRating() == null ? other.getRating() == null : this.getRating().equals(other.getRating()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getBalance() == null ? other.getBalance() == null : this.getBalance().equals(other.getBalance()))
            && (this.getCommissionRate() == null ? other.getCommissionRate() == null : this.getCommissionRate().equals(other.getCommissionRate()))
            && (this.getOpenTime() == null ? other.getOpenTime() == null : this.getOpenTime().equals(other.getOpenTime()))
            && (this.getCloseTime() == null ? other.getCloseTime() == null : this.getCloseTime().equals(other.getCloseTime()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getDeleted() == null ? other.getDeleted() == null : this.getDeleted().equals(other.getDeleted()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getMerchantNo() == null) ? 0 : getMerchantNo().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getOwnerName() == null) ? 0 : getOwnerName().hashCode());
        result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode());
        result = prime * result + ((getEmail() == null) ? 0 : getEmail().hashCode());
        result = prime * result + ((getPassword() == null) ? 0 : getPassword().hashCode());
        result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
        result = prime * result + ((getLng() == null) ? 0 : getLng().hashCode());
        result = prime * result + ((getLat() == null) ? 0 : getLat().hashCode());
        result = prime * result + ((getBusinessLicenseUrl() == null) ? 0 : getBusinessLicenseUrl().hashCode());
        result = prime * result + ((getRating() == null) ? 0 : getRating().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getBalance() == null) ? 0 : getBalance().hashCode());
        result = prime * result + ((getCommissionRate() == null) ? 0 : getCommissionRate().hashCode());
        result = prime * result + ((getOpenTime() == null) ? 0 : getOpenTime().hashCode());
        result = prime * result + ((getCloseTime() == null) ? 0 : getCloseTime().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", merchantNo=").append(merchantNo);
        sb.append(", name=").append(name);
        sb.append(", ownerName=").append(ownerName);
        sb.append(", phone=").append(phone);
        sb.append(", email=").append(email);
        sb.append(", password=").append(password);
        sb.append(", address=").append(address);
        sb.append(", lng=").append(lng);
        sb.append(", lat=").append(lat);
        sb.append(", businessLicenseUrl=").append(businessLicenseUrl);
        sb.append(", rating=").append(rating);
        sb.append(", status=").append(status);
        sb.append(", balance=").append(balance);
        sb.append(", commissionRate=").append(commissionRate);
        sb.append(", openTime=").append(openTime);
        sb.append(", closeTime=").append(closeTime);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", deleted=").append(deleted);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}